package com.yh.csx.event.resource;

import com.yh.csx.business.api.entity.CommonResponse;
import com.yh.csx.event.domain.gateway.IProjectGateway;
import com.yh.csx.event.store.gateway.project.ProjectGateway;
import com.yh.csx.event.store.project.ITeamServiceApi;
import com.yh.csx.event.store.project.dto.resp.TeamResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhangsheng
 * @date 2021/8/25 19:40
 */
@RestController
public class TeamResource implements ITeamServiceApi {

    @Autowired
    private IProjectGateway projectGateway;

    @Override
    public CommonResponse<List<TeamResp>> queryAllTeams() {
        return CommonResponse.success(projectGateway.queryTeams());
    }
}
